package 图书管理系统;

import java.util.Scanner;
import java.sql.*;

public class AddBook {
//    private String name;
//    private String author;
//    private String price;

    Book b = new Book();

    public String addBook(){
        System.out.println("请输入书名:");
        Scanner scn = new Scanner(System.in);
        String name = scn.nextLine();
//        b.setName(scn.nextLine());
        System.out.println("请输入作者:");
        Scanner sca = new Scanner(System.in);
//        b.setAuthor(sca.nextLine());
        String author = scn.nextLine();
        System.out.println("请输入图书价格:");
        Scanner scp = new Scanner(System.in);
        String price = scn.nextLine();
//        b.setPrice(scp.nextLine());


        String sql = "INSERT INTO `图书管理`(name,author,price,statm)value('"+name+"','"+author+"','"+price+"','true')";
        return sql;
    }

}
